
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@page import="src.Game"%>
<%@page import="java.io.*"%>
<jsp:useBean id="game" class="src.Game" scope="application"/>

<%
    if (session.getAttribute("playerID") != null) {

        String playerid = session.getAttribute("playerID").toString();
        int playerID = Integer.parseInt(playerid);

        if ("Get Optimum Effort".equals(request.getParameter("command"))) {
            try {
// comment here to hide recommendation
                Game.showRecommendation(playerID);
                response.sendRedirect("image2.jsp");
            } catch (Exception e) {
                e.printStackTrace();
            }

        }
    }
%>


<script type="text/javascript" language="JavaScript"><!--
      function pausecomp(ms) {
ms += new Date().getTime();
while (new Date() < ms){}
} 

     setTimeout(function () {
            document.getElementById("iframe").src = "compute.jsp";
    }, 1000);
document.computeForm.submit();
//--></script>

 <iframe style="border: none;" name="result" width="300" height="700" src="compute.jsp">
        </iframe>
        
        
        